package spring;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Service;

//@Service  //容器使用注解方式创建对象，@Controller,@Service,@Mapper,@Repository,@Component
@Data
public class Car {
  //  @Value("myMi")
    String name;
  //  @Value("XiaoMi")
    String type;
 //   @Value("300")
    int maxSpeed;
   public Car(){}
    public Car(String name,String type,int maxSpeed){
        this.name=name;
        this.type=type;
        this.maxSpeed=maxSpeed;
    }
}
